Automatically Improving Constraint Models in Savile Row through Associative-Commutative Common Subexpression Elimination
نویسندگان
چکیده
When solving a problem using constraint programming, constraint modelling is widely acknowledged as an important and difficult task. Even a constraint modelling expert may explore many models and spend considerable time modelling a single problem. Therefore any automated assistance in the area of constraint modelling is valuable. Common sub-expression elimination (CSE) is a type of constraint reformulation that has proved to be useful on a range of problems. In this paper we demonstrate the value of an extension of CSE called Associative-Commutative CSE (AC-CSE). This technique exploits the properties of associativity and commutativity of binary operators, for example in sum constraints. We present a new algorithm, X-CSE, that is able to choose from a larger palette of common subexpressions than previous approaches. We demonstrate substantial gains in performance using X-CSE. For example on BIBD we observed speed increases of more than 20 times compared to a standard model and that using X-CSE outperforms a sophisticated model from the literature. For Killer Sudoku we found that X-CSE can render some apparently difficult instances almost trivial to solve, and we observe speed increases up to 350 times. For BIBD and Killer Sudoku the common subexpressions are not present in the initial model: an important part of our methodology is reformulations at the preprocessing stage, to create the common subexpressions for X-CSE to exploit. In summary we show that X-CSE, combined with preprocessing and other reformulations, is a powerful technique for automated modelling of problems containing associative and commutative constraints.
منابع مشابه
Automatically improving constraint models in Savile Row
When solving a combinatorial problem using Constraint Programming (CP) or Satisfiability (SAT), modelling and formulation are vital and difficult tasks. Even an expert human may explore many alternatives in modelling a single problem. We make a number of contributions in the automated modelling and reformulation of constraint models. We study a range of automated reformulation techniques, findi...
متن کاملAutomatically Improving SAT Encoding of Constraint Problems Through Common Subexpression Elimination in Savile Row
Abstract. The formulation of a Propositional Satisfiability (SAT) problem instance is vital to efficient solving. This has motivated research on preprocessing, and inprocessing techniques where reformulation of a SAT instance is interleaved with solving. Preprocessing and inprocessing are highly effective in extending the reach of SAT solvers, however they necessarily operate on the lowest leve...
متن کاملConstraint Model Enhancement by Automated Common Subexpression Elimination
The modelling bottleneck in Constraint Modelling prevents the widespread use of Constraint Programming techniques. Automated Constraint Modelling addresses this problem. To enhance automatically generated models, we eliminate common subexpressions during the modelling process, as compilers do when compiling source code. Common subexpression elimination can lead to a dramatic reduction in the si...
متن کاملCommon Subexpression Elimination in Automated Constraint Modelling
Typically, there are many alternative models of a given problem as a constraint satisfaction problem, and formulating an effective model requires a great deal of expertise. To reduce this bottleneck, automated constraint modelling systems allow the abstract specification of a problem, which can then be refined automatically to a solver-independent modelling language. The final step is to tailor...
متن کاملAutomated Constraint Model Enhancement during Tailoring
Constraint modelling is difficult, particularly for novices. Hence, automated methods for improving models are valuable. The context of this paper is tailoring, a process where a solver-independent constraint model is adapted to a target solver. Tailoring is augmented with automated enhancement techniques, in particular common subexpression detection and elimination, which, while powerful, can ...
متن کامل